import java.util.Scanner;

/*public class Operators {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        byte myVar = (byte) (sc.nextByte() + sc.nextByte());
        sc.close();
        System.out.printf("%s", myVar);
    }
}

public class Operators {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double widthFigures = sc.nextDouble(), longFigures = sc.nextDouble();
        System.out.printf("%s\n%s", widthFigures*longFigures, (widthFigures+longFigures)*2);
    }
}
public class Operators {
    public static void main(String[] args) {
        double x = new java.util.Scanner(System.in).nextDouble(), y = 5 * x*x + 2 * x + 11;
        System.out.println(y);
    }
}

public class Operators {
    public static void main(String[] args) {
        int x = new java.util.Scanner(System.in).nextInt();
        System.out.printf("%s %s %s", x, x*x , x*x*x);
    }
}


public class Operators {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.close();
        System.out.printf("%s", (sc.nextDouble() + sc.nextDouble() + sc.nextDouble()) / 3 );
    }
}

public class Operators {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.printf("%s", (Math.abs(sc.nextInt() % 10)));
        sc.close();
    }
}


public class Operators {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt(), y = sc.nextInt();
        sc.close();
        System.out.printf("%s %s", x/y, x%y);
    }
}
*/
public class Operators {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int seconds = sc.nextInt();
        sc.close();
        System.out.printf("%02d:%02d:%02d", seconds%86400/3600,seconds%3600/60, seconds%3600%60 );
    }
}